<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            background: black;
        }
        #box{
            display: flex;
            background-color: black;
        }
        .colon{
            color: white;
            font-size: 71px;
        }
    </style>
</head>
<body>
    <div id="box">
        <img src="images/0.png" alt="">
        <img src="images/0.png" alt="">
        <span class="colon">:</span>
        <img src="images/0.png" alt="">
        <img src="images/0.png" alt="">
        <span class="colon">:</span>
        <img src="images/0.png" alt="">
        <img src="images/0.png" alt="">
    </div>
    <script>
        function handleTime(value){
            if(value<10){
                return "0"+value
            }else{
                return ""+value
            }
        }
        function showTime(){
            var imgs = document.querySelectorAll("#box img")
            var d = new Date()
            var hours = handleTime(d.getHours())
            var minutes = handleTime(d.getMinutes())
            var seconds = handleTime(d.getSeconds())
            var sum = hours+minutes+seconds
            // console.log(sum);
            // console.log(typeof sum);
            for(var i=0;i<imgs.length;i++){
                //imgs[i].src = "images/"+sum[i]+".png"
                imgs[i].src = `images/${sum[i]}.png`
            }
            setTimeout(function(){
                showTime()
            },1000)
        }
        showTime()
    </script>
</body>
</html>